package com.frxuexi.park2209_2.hourse

import androidx.lifecycle.MutableLiveData
import com.frxuexi.base.bean.HomeBean
import com.frxuexi.base.bean.HourseDetailBean
import com.frxuexi.base.mvvm.BaseViewModel
import com.frxuexi.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import javax.inject.Inject

@HiltViewModel
class HourseViewModel @Inject constructor(val apiService: ApiService):BaseViewModel() {
    var homeSuc = MutableLiveData<HomeBean>()
    var hourseDetailSuc = MutableLiveData<HourseDetailBean>()

    fun getHomeMsg(){
        httpRequest({apiService.getHomeMessages()},homeSuc::postValue)
    }

    fun getHourseDetail(){
        httpRequest({apiService.getHourseDetail()},hourseDetailSuc::postValue)
    }
}